import ElementLocale from 'element-ui/lib/locale'

export default ({ app, store }) => {
  if (process.client) {
    app.i18n.setLocale(store.state.app.language);
    ElementLocale.i18n((key, value) => app.i18n.t(key, value))
  }
};
